sirajwikiaorg-20200213-history
Quantum
Video : Quantum with D-Wave Date: 3rd December 2018 (because qbits are ternary) Transcript This quantum computer is too powerful. Let's see how it works. Hello world, it's Siraj and anyone who has a laptop and an internet connection can now use a quantum computer to submit and run applications receiving solutions in seconds D waves leap service is the first cloud-based Quantum application environment that gives developers real-time access to a live quantum computer in this video we'll use the leap service to build a simple application to monitor a crop health-sensor network quantum computing is already being applied to early real-world applicationsVolkswagen for example first used data from taxis in Beijing to see how well a quantum computer could optimizethe travel time of taxis in the city based on that success BW has stated that they are working on putting their algorithm to use commercially for traffic management in Lisbon recruit communications applied it to optimize the efficiency of matching advertisements to customers for web advertising and recently announced they could increase sales using a quantum algorithm from cryptography to medicine to financial markets quantum computing can be applied to almost every industry to solve real problems quantum mechanics is the body of scientific laws that describe the motion and interaction of photons electrons and other subatomic particles that make up our universe quantum computers exploit the rules of quantum mechanics to solve problems and these rules are hard for us to conceptualize because they're so different than what we're used to. Let's say we flipped a coin, we know what will happen: it'll go up then down and land onheads or tails : these are all single truths but if we shrunk down to the subatomic level and again flip the coin there would be multiple truths the coin would be in both heads and tails simultaneously in the air it can % heads and % tails for example simultaneously and he would stay in midair until it's observed by some measuring device yet a human or machine. Pretty wild, right? To quote Dr. Feynman, "if you think you understand quantum mechanics, you don't understand quantum mechanics" Quantum computing exploits three key features of quantum mechanics for computing superposition entanglement andquantum tunneling particles can exist across all possible States simultaneously and this is known as a superposition of States an electron for example may exist in two possible spinStates usually referred to as spin up and spin down simultaneously and sometimes groups of particles interact in ways such that the quantum state of each particle cannot be describedindependently of the state of the others even when the particles are separated bya large distance this is called entanglement and quantum tunneling helps quantum computers explore the space ofall possible solutions to a problem which can be thought of as low line points in a mountainous terrain by drilling through all the mountains simultaneously rather than having to goover them d-wave invited me to Vancouver to see their quantum computer in person and it was an incredible experience I saw that while a classical computer uses bits to perform computation their quantum machine uses qubits so instead of taking on the value of either 0, 1 or it can take on both at the same time in a superimposed state and these qubits can be entangled with each other to compute huge amounts of data and solvecertain complex problems that would take classical computers millions of years to calculate the way this is done is not by using what we're used to the classical CMOS or complementary metal-oxide-semiconductor transistor but instead what's called a squid or superconducting quantum interference deviceaka quantum transistors instead of using silicon it uses a metal called niobium that when cooled below negative four degrees Celsius becomes a superconductor and starts to exhibit quantum mechanical effects while a regular transistor only lets us encodetwo different states using voltages a qubit can encode two states as tinymagnetic fields that can support up or down simultaneously couplers connect qubits together such that they can exchange information easily as amazing as quantum machines are let's be clearthey are not a replacement for classical computers instead they're complementary for a subset of classical problemsquantum computing will make a dramaticdifference we can in fact think of the quantum computation process as engineering the pattern of a complex set of waves in hope of channeling the flow towards the correct answer so let's take a look at the leap service first hand to see what it offers us we can sign up for an account on the landing page then we'll be able to access the dashboard here we can see how much time we have to use the quantum processing unit or qpuit doesn't seem like a lot of time but it is because quantum computers are so fast they can perform computations in just milliseconds there are a whole host of learning materials on this dashboard including educational videos research publications and real world case studies that show how their clients have used their quantum computer to solve customer problems the community support tab also leads to access to their technical forums that allow developers to share and learn about quantum computing my favorite part of the dashboard are the interactive demos that can be viewed in the browser to learn more about specificuse cases as well as Jupyter notebooks that demonstrate different quantum algorithms in the cloud the ocean SDK is D waves Python library that wraps theAPI and lets us access the QP you in a simple three-step process afterinstalling it using the popular pip installer we just set our API token and we can verify our connection to the QP you with the King command so for our use case imagine were a software-as-a-service startup that creates custom sensor networks for farmers so that they get crop information in real time allowing the to make smarter decisions we can build a network of devices that can sense water quality air pollution crop health and more then we'll want to create asecurity system that ensures that this system is not compromised by a third party and the data stolen will want tomonitor network traffic as it moves between all of our routers we could place a traffic monitor on every single device in our network but that would bean expensive hardware cost instead what if we place network traffic sensors in the minimum amount of spots necessarysuch that the sensors are still able tomonitor all traffic in the network we can consider this a graph problem nodesare sensor outposts full of different equipments and the edges represent all the paths that data flows through between these nodes we're trying to find what's called the minimum vertex cover a vertex cover is a set of vertices such that each edge of the graph is incident with at least one vertex in the set a minimum vertex cover then is the vertex cover of smallest size let's open our own cloud notebook using the leap service to solve an optimization problemwe can visualize a simple example of this using the network x python package it's used to study the structure of complex networks after importing it we can create a node star graph in a single line the minimum set of vertices that touch all edges is node that's the solution to this simple problem but the general problem of finding us such a set is np-hard well first solve this problem on a CPU since first a small number of variables it's possible to compute classically in a relatively short time then we'll do it on the qputo solve it on the CPU we'll initialize a sampler using the exact solver module of the official die mod API a solver is a resource that runs a problem and samplers are processes that sample from low energy states of problems objective function which is a mathematical expression of the energy of a system the sampler we've initialized returns a binary quadratic models value for every possible assignment of variable values this is a collection of binary valued variable that are variables that can be assigned to values like negative one and one with associated linear and quadratic biases a bqm sampler samples from low energy states in one of the default models defined by d-wave in the API and returns an iterable of samples in order of increasing energy this helps formulate optimization problems then we can use the wave networks library to produce a bqm for our graph and solve it on our select sampler we're not explicitly creating the bqm it's extracted by the ocean tool so given the problem graph it returns a solution to a bqm that it creates internally now to solve it on a quantum processor we can use ad wave sampler and a new addition the embedding composite this Maps unstructured problems to the graph structure of the selected sampler via a process called minor embedding our problem star graph must be mapped to the QP use numerically indexed qubits we'll see that it creates a new graph and solves it on the QP u we can know that this solution isn't unique in fact there are multiple valid solutions when we give our algorithm a much larger graph that consists of real-world data it will perform the same tasks and we can use the output as a guide as to where exactly we should place traffic monitoring equipment we now know the least amount of equipment we need to buy to monitor the entire network a lot to take in all at once I know but it's a very exciting field there are three things to remember fromthis video d waves leap is the first cloud based quantum application environment that gives developers real-time access to a live quantum computer quantum computing uses three key features from quantum mechanics to perform computations including superposition entanglement and tunneling and we can solve the minimum vertex problem for a graph much faster using a quantum machine than a classical one also coding challenge for the week create a simple application using leap that solves the problem I'll give a shout out next week to the top two entries and a special prize for number one I'm looking for great documentation and an interesting use case good luck wizards please subscribe for more programming videos and for now I've gotta stop interfering so thanks for watching!